package interfaces;
import com.toedter.calendar.JDateChooser;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;

import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaInscripcionActividad extends javax.swing.JDialog {
	private JLabel jLabelIdActividad;
	private JLabel jLabelEsnCard;
	private JLabel jLabelPago1;
	private JLabel jLabelPago2;
	private JTextField jTextFieldEmail;
	private JComboBox jComboBoxFraccionado;
	private JButton jButtonCancelar;
	private JButton jButtonGuardar;
	private JDateChooser jDateChooserFechaInscripcion;
	private JTextField jTextFieldIdActividad;
	private JTextField jTextFieldEsnCard;
	private JTextField jTextFieldNumeroPlaza;
	private JComboBox jComboBoxTipoPago;
	private JTextField jTextFieldPago2;
	private JTextField jTextFieldPago1;
	private JLabel jLabelEmail;
	private JLabel jLabelFraccionado;
	private JLabel jLabelTipoPago;
	private JLabel jLabelNumeroPlaza;
	private JLabel jLabelFecha;

	/**
	* Auto-generated main method to display this JDialog
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				JFrame frame = new JFrame();
				VentanaInscripcionActividad inst = new VentanaInscripcionActividad(frame);
				inst.setVisible(true);
			}
		});
	}
	
	public VentanaInscripcionActividad(JFrame frame) {
		super(frame);
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				GridBagLayout thisLayout = new GridBagLayout();
				thisLayout.columnWidths = new int[] {130, 10, 240};
				thisLayout.columnWeights = new double[] {0.0, 0.0, 0.0};
				thisLayout.rowHeights = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40};
				thisLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
				getContentPane().setLayout(thisLayout);
				this.setEnabled(false);
				this.setTitle("ESN Office - Inscripción en actividad");
				{
					jLabelIdActividad = new JLabel();
					getContentPane().add(jLabelIdActividad, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelIdActividad.setText("ID:");
				}
				{
					jLabelEsnCard = new JLabel();
					getContentPane().add(jLabelEsnCard, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelEsnCard.setText("ESN Card:");
				}
				{
					jLabelFecha = new JLabel();
					getContentPane().add(jLabelFecha, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelFecha.setText("Fecha de inscripción:");
				}
				{
					jLabelNumeroPlaza = new JLabel();
					getContentPane().add(jLabelNumeroPlaza, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelNumeroPlaza.setText("Numero de plaza:");
				}
				{
					jLabelTipoPago = new JLabel();
					getContentPane().add(jLabelTipoPago, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelTipoPago.setText("Tipo de pago:");
				}
				{
					jLabelFraccionado = new JLabel();
					getContentPane().add(jLabelFraccionado, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelFraccionado.setText("Fraccionado:");
				}
				{
					jLabelPago1 = new JLabel();
					getContentPane().add(jLabelPago1, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelPago1.setText("Pago 1:");
				}
				{
					jLabelEmail = new JLabel();
					getContentPane().add(jLabelEmail, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelEmail.setText("E-mail del creador:");
				}
				{
					jLabelPago2 = new JLabel();
					getContentPane().add(jLabelPago2, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jLabelPago2.setText("Pago 2:");
				}
				{
					jTextFieldEmail = new JTextField(); //automaticamente el usuario que está conectado
					getContentPane().add(jTextFieldEmail, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					jTextFieldPago2 = new JTextField();
					getContentPane().add(jTextFieldPago2, new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					jTextFieldPago1 = new JTextField();
					getContentPane().add(jTextFieldPago1, new GridBagConstraints(2, 7, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					ComboBoxModel jComboBoxTipoPagoModel = 
							new DefaultComboBoxModel(
									new String[] {"Tarjeta de crédito", "Banco", "Paypal" });
					jComboBoxTipoPago = new JComboBox();
					getContentPane().add(jComboBoxTipoPago, new GridBagConstraints(2, 5, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jComboBoxTipoPago.setModel(jComboBoxTipoPagoModel);
				}
				{
					jTextFieldNumeroPlaza = new JTextField();
					getContentPane().add(jTextFieldNumeroPlaza, new GridBagConstraints(2, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					jTextFieldEsnCard = new JTextField();
					getContentPane().add(jTextFieldEsnCard, new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					jTextFieldIdActividad = new JTextField();
					getContentPane().add(jTextFieldIdActividad, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					jDateChooserFechaInscripcion = new JDateChooser("dd/MM/yyyy", "##-##-####", '-');
					getContentPane().add(jDateChooserFechaInscripcion, new GridBagConstraints(2, 9, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					ButtonGroup bgroup = new ButtonGroup();
				}
				{
					jButtonGuardar = new JButton();
					getContentPane().add(jButtonGuardar, new GridBagConstraints(2, 10, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					jButtonGuardar.setText("Guardar");
					jButtonGuardar.setPreferredSize(new java.awt.Dimension(90, 23));
					jButtonGuardar.setSize(70, 23);
				}
				{
					jButtonCancelar = new JButton();
					getContentPane().add(jButtonCancelar, new GridBagConstraints(2, 10, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					jButtonCancelar.setText("Cancelar");
					jButtonCancelar.setPreferredSize(new java.awt.Dimension(90, 23));
					jButtonCancelar.setSize(70, 23);
					jButtonCancelar.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							jButtonCancelarActionPerformed(evt);
						}
					});
				}
				{
					ComboBoxModel jComboBoxFraccionadoModel = 
							new DefaultComboBoxModel(
									new String[] { "No", "Sí" });
					jComboBoxFraccionado = new JComboBox();
					getContentPane().add(jComboBoxFraccionado, new GridBagConstraints(2, 6, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					jComboBoxFraccionado.setModel(jComboBoxFraccionadoModel);
				}
			}
			this.setSize(480, 380);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void jButtonCancelarActionPerformed(ActionEvent evt) {
		System.out.println("jButtonCancelar.actionPerformed, event="+evt);
		//TODO add your code for jButtonCancelar.actionPerformed
		this.dispose();
	}

}
